﻿using System;
using System.Windows.Data;

namespace DeploySources.Converter
{
	/// <summary>
	/// Convert Bool to Height in xaml
	/// </summary>
	public class BoolToHeightConverter : IValueConverter
	{
		public object Convert(object value, Type targetType, object parameter,
		System.Globalization.CultureInfo culture)
		{
			if (((bool)value))
				return Double.NaN;

			return 0;
		}

		public object ConvertBack(object value, Type targetType, object parameter,
			System.Globalization.CultureInfo culture)
		{
			throw new NotSupportedException();
		}

	}
}
